package org.loong.crypto.service.core.provider.impl;

import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.Set;

import org.loong.crypto.core.algorithm.CipherAlgorithm;

/**
 * The base abstract class for SM2 encrypter and decrypter.
 * 
 * <p>
 * Supports the following algorithms:
 *
 * <ul>
 * <li>{@link org.loong.crypto.core.algorithm.CipherAlgorithm#SM2}
 * </ul>
 */
public abstract class SM2CipherProvider extends BaseCipherProvider {

    /**
     * The supported encryption algorithms by the SM2 cipher provider class.
     */
    public static final Set<CipherAlgorithm> SUPPORTED_ALGORITHMS;

    static {
        Set<CipherAlgorithm> algs = new LinkedHashSet<>();
        algs.add(CipherAlgorithm.SM2);
        SUPPORTED_ALGORITHMS = Collections.unmodifiableSet(algs);
    }

    /**
     * Creates a new SM2 provider.
     */
    protected SM2CipherProvider() {
        super(SUPPORTED_ALGORITHMS, Collections.emptySet());
    }
}
